﻿#pragma once

#include <QtWidgets/QMainWindow>
#include "ui_computevision.h"
#include "../Interface/interface1.h"
#include <QGraphicsScene>
#include <QGraphicsPixmapItem>

#pragma execution_character_set("utf-8")

class ComputeVision : public QMainWindow
{
    Q_OBJECT

public:
    ComputeVision(QWidget *parent = Q_NULLPTR);
    ~ComputeVision();

private:
    Ui::ComputeVisionUI ui;

private:
    void populatePluginsMenu();     //填充插件菜单
    void slot_pluginActionTriggered();      //菜单项被点击
private slots:
    void slot_currentPluginUpdateNeeded();  //接收插件信号的槽函数
    void slot_openImg();
private:    
    Interface1* currentPlugin=nullptr;  //指针创建时养成nullptr习惯
    QWidget* currentPluginUi= nullptr;
    cv::Mat originalMat, processedMat;
    QImage originalImg, processedImg;
    QGraphicsScene scene;   //Scene必须放到Item前面
    QGraphicsPixmapItem originalPixmap, processedPixmap;
    
};
